package main 

import "fmt"

func main() {
	a := 10
	str := "mike"

	fmt.Printf("外部：a = %d，str = %s\n")

	func() {
		fmt.Println("调用了匿名方法")
		a = 666
		str = "jack"
		fmt.Printf("内部，a：%d，str：%s\n", a, str)
	}()

	fmt.Printf("外部，a：%d，str：%s\n", a, str)
}